package com.wangchao523.util;

import com.db4o.Db4oEmbedded;
import com.db4o.ObjectContainer;
import com.wangchao523.util.servletUtil.InitServlet;

/**
 * db4o数据库操作类
 * 
 * @author corey
 * 
 */
public class Db4oUtil {

	public static ObjectContainer getDb4o() {
		ObjectContainer db = Db4oEmbedded.openFile(Db4oEmbedded.newConfiguration(), InitServlet.db4oPath);
		return db;
	}
	
	public static void closeDb4o(ObjectContainer db){
		db.close();
	}
	
}
